#include <string.h>
#include <stdio.h>
#include <assert.h>

int main()
{
  char str[] = "?a???b,,,#c";
  char *t;
  t = strtok(str, "?"); // t points to the token "a"
  puts(t);
  t = strtok(NULL, ","); // t points to the token "??b"
  puts(t);
  t = strtok(NULL, "#,"); // t points to the token "c"
  puts(t);
  t = strtok(NULL, "?"); // t is a null pointer
  assert(t == NULL);
  return 0;
}
